<?php 
include  "./../protected.php"; /*Valida el inico de sesion*/
?>
<!doctype html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <title>Agregar documento</title>
  <link rel="stylesheet" type="text/css" href="mtb.css"/>
  <link rel="stylesheet" type="text/css" href="main.css"/>
  <link rel="stylesheet" type="text/css" href="ceGrid.css"/>
  <script type="text/javascript" src="../../../js/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="../../../css/index.css" />
</head>

<a class="btn" href="index.php">Listar documentos</a>
<body>
<div id="content-mt">

<div id="div01"  class="curved" >
<form name="Reg_documento" method="post"  id="form-tipo" class="style" > 
<table id = "tab01">
     <tr>
     <div id="error"></div>
	     <td>Tipo de documento</td>
         <td><label>
             <input type="text" name="Txt_GS02DETPO" id="datos" value ="" maxlength="80"/> 
         </label></td>
    </tr>

    </tr>
         <td></td>
         <td><label>
         <input type="submit" name="Agregar_Btn" class="btn-m" id="Agregar_Btn" value="Agregar" />
         </label></td>
     </tr>
  </table> 
 </form>
</div>
</div>
</body>
<script type="text/javascript">
    
    $(function(){
        $("#datos").focus();
    $("#form-tipo").submit(function(e){
        e.preventDefault();
    var form_data= {    
           datos:$("#datos").val(),
           

        };

        $.ajax({
          type:"POST",
            url:"Insert.php",
            data:form_data,
            success: function(responde){

               

                          
                     $("#datos").val("");
               
                    $("#error").html(responde);
            }

        });
    });
    });
</script>

</html>